Skip to content

feat(gateway): relayed bodies travel on byte channels - #570

Merged
V3RON merged 10 commits into
task/556from
task/558
Oct 14, 2026
Merged

V3RON merged 10 commits into
task/556from
task/558

Conversation

@V3RON

@V3RON V3RON commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Closes #558

Status

Implement: done (1198 green) Review: round 2, clean; 2 text fixes unreviewed Hardware: n/a Gate: waiting for the stack

Done when

  • Every Tests line passes (src/daemon, src/gateway, src/link, src/contract unit files green on the head; CI checked).

Assumptions

  • Assumption: where the spec says the startup tests are "modelled on server.test.ts:1241", they live in src/daemon/server.test.ts as a new describe, using the existing createHarness (given a relayTargets option) with a link pair on the uplink, and the fake clock of the link pair for the 60 s wait — the smallest change that reuses the harness.

  • Assumption: the protocol bump is tested as 34 (33 plus one) in the existing protocol-range tests, with 33 added to the list of previous versions the daemon refuses.

  • Assumption: relayChannelSchema is a placeholder (z.string()) in src/contract/relay.ts so the red tests compile; green gives it the 1–32 [A-Za-z0-9-] bound.

  • Assumption: a request that reaches an uplink before start() has claimed its socket parks on a gate that follows convergence — the startup tests send a relay in that window, and the conservative option is to park every non-status.get call there, as it already does after the claim.

  • Assumption: src/daemon/relay.test.ts (not named in F17) only changes how it builds its arguments: relay.request takes the accepted channel and the push has no chunk.

  • Assumption: the daemon test helpers settle and readAll are renamed settleWithin and readParts, so they do not repeat the link's exports (Fallow duplicate-export).

Review

Spec review: 7 blocking, 7 fixed, 0 notes. Code review: 5 blocking, 5 fixed, 0 notes. Claims review: 3 blocking, 3 fixed, 0 notes.
Rounds: 2. Tokens: 9.6M.

Fixed unreviewed: server.test.ts:1516 channel-before-parking assertion; COMPONENTS.md:45 Relay targets row.

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review October 14, 2026 14:21
@V3RON
V3RON added this pull request to stack #566 October 14, 2026 14:21
V3RON added 9 commits October 14, 2026 17:13
…own slot limits go (#558)

why: 7 failing -> 0 failing in the spec tests; the uplink is wrapped with the link on both ends,
relay.body and relay-chunk are gone, relay.request names a channel, the protocol is 34.
…nk's

why: 0 failing -> 0 failing; the audit named two duplicate exports and two stale suppressions.
…r then peer abort, caller body and timer cleanup (#558)
…iew's unproven lines get tests, comments and docs match the code (#558)
…s, and the real-socket helper stays beside the link's own tests (#558)
@V3RON
V3RON merged commit 22cd258 into main Oct 14, 2026
22 checks passed
@V3RON
V3RON deleted the task/558 branch October 14, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(gateway): relayed bodies travel on byte channels

1 participant